﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DailyComics.Common.Model;

namespace DailyComics.Common.Utilities.ImageProviderDecorator
{
  public abstract class ImageProviderDecoratorBase : IImageProvider
  {
    private IImageProvider provider;

    public ImageProviderDecoratorBase(IImageProvider provider)
    {
      if (provider != null)
      {
        this.provider = provider;
      }
      else
      {
        throw new ArgumentNullException("provider");
      }
    }

    public virtual byte[] GetImage(DateTime date)
    {
      return provider.GetImage(date);
    }
  }
}
